<script setup>
defineProps(['msg'])
defineEmits(['update:msg'])
</script>

<template>
  <h1>{{ msg }}</h1>
  <button @click="emit('update:msg', '数据改变了')">changeMsg</button>
</template>

<style></style>
